package com.example.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service
public class GirlServers {
    @Autowired
    private  GirlRepository girlRepository;
    @Transactional
    public  void insertTwo(){
        Girl girl1=new Girl();
        girl1.setCupSize("A");
        girl1.setAge(15);
        girlRepository.save(girl1);
        Girl girl2=new  Girl();
        girl2.setAge(16);
        girl2.setCupSize("B");
        girlRepository.save(girl2);

    }
}
